約 5,333,245 件
https://w.atwiki.jp/assolutoracingjpn/pages/104.html
イベントカレンダー 日にち 時刻 イベント名 URL // カレンダー表を生成する関数 function generateCalendar(year, month) { // 日付の配列を生成 const dateArray = generateDateArray(year, month); // カレンダー表のHTMLを生成 const calendarHtml = generateCalendarHtml(dateArray); // カレンダー表を表示 const calendarElement = document.getElementById( calendar ); calendarElement.innerHTML = calendarHtml; function generateDateArray(year, month) { const dateArray = []; const firstDate = new Date(year, month - 1, 1); const lastDate = new Date(year, month, 0); for (let date = firstDate; date = lastDate; date.setDate(date.getDate() + 1)) { dateArray.push(new Date(date)); } return dateArray; } function generateCalendarHtml(dateArray) { const weekDays = [ 日 , 月 , 火 , 水 , 木 , 金 , 土 ]; let calendarHtml = table tr th 日 /th th スタート時 /th th イベント名 /th /tr ; for (let i = 1; i = 31; i++) { const day = i 10 ?` 0${i}` i; calendarHtml += ` tr td ${day} /td td /td td /td /tr `; } calendarHtml += /table ; const calendarElement = document.getElementById( calendar ); calendarElement.innerHTML = calendarHtml; const formElement = document.getElementById( schedule-form ); formElement.addEventListener( submit , function(event) { event.preventDefault(); // デフォルトの送信をキャンセル const date = event.target.elements.date.value; const time = event.target.elements.time.value; const eventTitle = event.target.elements.eventTitle.value; const url = event.target.elements.url.value; const calendarDayElement = document.querySelector(`td nth-of-type(${date.slice(-2)})`); calendarDayElement.nextElementSibling.textContent = time; const eventLinkElement = document.createElement( a ); eventLinkElement.href = url; eventLinkElement.textContent = eventTitle.slice(0, 10); calendarDayElement.nextElementSibling.nextElementSibling.appendChild(eventLinkElement); }); const now = new Date(); let year = now.getFullYear(); let month = now.getMonth() + 1; function updateCalendar() { const firstDayOfMonth = new Date(year, month - 1, 1); const firstDayOfWeek = firstDayOfMonth.getDay(); const startDate = new Date(year, month - 1, 1 - firstDayOfWeek); let day = startDate.getDate(); for (let i = 1; i = 31; i++) { const dayOfMonth = new Date(year, month - 1, day); if (dayOfMonth.getMonth() + 1 !== month) { break; } const dayOfWeek = dayOfMonth.getDay(); const dayOfWeekText = weekDays[dayOfWeek]; const dayOfWeekClass = dayOfWeek === 0 ? sunday (dayOfWeek === 6 ? saturday ); const calendarDayElement = document.querySelector(`td nth-of-type(${i})`); calendarDayElement.textContent = day; calendarDayElement.classList.remove( sunday , saturday ); if (dayOfWeekClass) { calendarDayElement.classList.add(dayOfWeekClass); } day++; } const yearMonthElement = document.getElementById( year-month ); yearMonthElement.textContent = `${year}年${month}月`; } function addMonthButtons() { const prevBtn = document.createElement( button ); prevBtn.textContent = 前の月へ ; prevBtn.addEventListener( click , () = { currentDate.setMonth(currentDate.getMonth() - 1); renderCalendar(); }); const nextBtn = document.createElement( button ); nextBtn.textContent = 次の月へ ; nextBtn.addEventListener( click , () = { currentDate.setMonth(currentDate.getMonth() + 1); renderCalendar(); }); const btnContainer = document.createElement( div ); btnContainer.appendChild(prevBtn); btnContainer.appendChild(nextBtn); calendarContainer.appendChild(btnContainer); } const currentDate = new Date(); const calendarContainer = document.getElementById( calendar ); addMonthButtons(); renderCalendar(); }
https://w.atwiki.jp/cz8686/pages/17.html
[HTML] ヘッダ部記述 !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" HTML HEAD META HTTP-EQUIV="Pragma" CONTENT="no-cache" META HTTP-EQUIV="Cache-Control" CONTENT="no-cache,must-revalidate" META HTTP-EQUIV="Expires" CONTENT="0" META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS" TITLE ページタイトル /TITLE /HEAD [HTML] 表示バー table width="480" border="0" cellspacing="0" cellpadding="5" tr td height="50" width="15" bgcolor="#0000CC" /td td height="50" width="385" bgcolor="#CCCCFF" font size="3" b こんな感じで表示 /b /font /td /tr /table [HTML]作成者フッター TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" TR TD ALIGN="RIGHT" HR Copyright(C)なんとか会社, Ltd. 2008. All rights reserved. /TD /TR /TABLE
https://w.atwiki.jp/rockband/pages/172.html
RB3VerのDLCはRB1、2では使用不可 Artist Song title Decade Genre Rush Subdivisions 1980s Progressive New Order Blue Monday 1980s New Wave Talking Heads Burning Down the House 1980s New Wave Deftones My Own Summer (Shove It) 1990s Metal B.B.King The Thrill Is Gone 1960s Blues Procol Harum A Whiter Shade of Pale 1960s Classic Rock .38 Special Hold On Loosely 1980s Southern Rock Bad Company Can t Get Enough 1970s Classic Rock Anaïs Croze Peut-Être une Angine 2000s Pop/Rock BAP Verdamp Lang Her 1980s Rock BB Brunes Dis-Moi 2000s Pop/Rock Caesars Jerk It Out 2000s Indie Rock John Yoko,The Plastic Ono Band Happy Xmas(War Is Over) 1970s Classic Rock Linea 77 Fantasma 2000s Nu-Metal Litfiba Proibito 1990s Rock Skizoo Dame Aire 2000s Metal Tutankamon Starting to Appreciate 2010s Pop/Rock Wir sind Helden Nur ein Wort 2000s Pop/Rock Inhabited Open My Eyes 2000s Pop/Rock Siouxsie and The Banshees Cities in Dust 1980s Pop/Rock Death Cab for Cutie I Will Possess Your Heart 2000s Indie Rock OK Go Shooting the Moon 2000s Pop/Rock The Police Every Breath You Take 1980s Pop/Rock The Police So Lonely 1970s Pop/Rock War Spill the Wine 1970s Classic Rock DragonForce Through the Fire and Flames 2000s Metal DragonForce Operation Ground and Pound 2000s Metal Grand Funk Railroad The Loco-Motion 1970s Classic Rock Grand Funk Railroad We re an American Band 1970s Classic Rock J.Geils Band Freeze-Frame 1980s Rock Joy Division Love Will Tear Us Apart 1980s New Wave Anberlin Breaking 2000s Alternative Mastodon Blood and Thunder 2000s Metal Ohio Players Fire 1970s R B/Soul/Funk Ohio Players Love Rollercoaster 1970s R B/Soul/Funk Relient K Must Have Done Something Right 2000s Pop/Rock Tommy Tutone 867-5309/Jenny 1980s Rock Kiss Rock and Roll All Nite(Live) 1970s Classic Rock Kiss Strutter(Live) 1970s Classic Rock Culture Club Do You Really Want to Hurt Me 1980s New Wave Faith No More From Out of Nowhere 1980s Rock Loverboy Working for the Weekend 1980s Pop/Rock Phish Stash 1990s Rock Phish Tweezer 1990s Rock Stone Temple Pilots Big Bang Baby 1990s Alternative Lordi Hard Rock Hallelujah 2000s Metal Run-DMC King of Rock 1980s Rap/Hip-Hop Peter Frampton Do You Feel Like We Do(Live) 1970s Rock Foreigner Hot Blooded 1970s Classic Rock Foreigner Urgent 1980s Classic Rock a-ha Take On Me 1980s New Wave Avenged Sevenfold Unholy Confessions 2000s Metal Avenged Sevenfold Welcome to the Family 2010s Metal Chumbawamba Tubthumping 1990s Pop-Rock Live I Alone 1990s Alternative Live Lightning Crashes 1990s Alternative Buffalo Springfield For What It s Worth 1960s Classic Rock R.E.M. Man on the Moon 1990s Alternative System of a Down Aerials 2000s Nu-Metal System of a Down Hypnotize 2000s Nu-Metal The Vapors Turning Japanese 1980s Punk Erasure A Little Respect 1980s New Wave Frankie Goes to Hollywood Relax (Come Fighting) 1980s Pop/Dance/Electronic P.O.D. Boom 2000s Nu-Metal P.O.D. Youth of the Nation 2000s Nu-Metal Beastie Boys Make Some Noise 2010s Hip-Hop/Rap Beastie Boys No Sleep till Brooklyn 1980s Hip-Hop/Rap Heart Barracuda 1970s Classic Rock James Brown Super Bad, Pts.1 2 1970s R B/Soul/Funk Rufus(featuring Chaka Khan) Tell Me Something Good 1970s R B/Soul/Funk Deep Purple Child in Time 1970s Prog EMF Unbelievable 1990s Pop/Dance/Electronic Janis Joplin the Full Tilt Boogie Band Me and Bobby McGee 1970s Classic Rock The Clash Rock the Casbah 1980s Punk The Darkness I Believe in a Thing Called Love 2000s Glam Rob Zombie Living Dead Girl 1990s Nu-Metal White Zombie Super-Charger Heaven 1990s Metal White Zombie Thunder Kiss 65 1990s Metal Black Veil Brides Rebel Love Song 2010s Rock Volbeat A Warrior s Call 2010s Metal The Edgar Winter Group Free Ride 1970s Classic Rock The Edgar Winter Group Frankenstein 1970s Classic Rock Korn Freak on a Leash 1990s Nu Metal Korn Falling Away From Me 1990s Nu Metal Sum 41 Fat Lip 2000s Punk Sum 41 Still Waiting 2000s Punk Tears for Fears Head Over Heels 1980s New Wave Everclear Santa Monica 1990s Alternative Good Charlotte The Anthem 2000s Pop-Rock Mastodon Curl of the Burl 2010s Metal Men at Work Down Under 1980s New Wave Men at Work Overkill 1980s New Wave Santana (ft. Rob Thomas) Smooth 1990s Classic Rock Eddie Money Two Tickets to Paradise 1970s Classic Rock Train Drops of Jupiter 2000s Pop/Rock Yellowcard Only One 2000s Emo Cracker Teen Angst (What the World Needs Now) 1990s Alternative Florence + the Machine Dog Days Are Over 2000s Indie Rock Midnight Oil Power and the Passion 1980s New Wave Incubus Drive 1990s Alternative Angels Airwaves The Adventure 2000s Alternative Owl City Fireflies 2000s Pop/Dance/Electronic Queens of the Stone Age In My Head 2000s Alternative The All-American Rejects Gonzo 2010s Emo Mudvayne Happy? 2000s Metal Rise Against Satellite 2010s Punk The B-52 s Love Shack 1980s Pop/Rock Staind Not Again 2010s Nu-Metal Young the Giant My Body 2010s Indie Rock Foster the People Helena Beat 2010s Indie Rock Foster the People Don t Stop (Color on the Walls) 2010s Indie Rock The Strokes Under Cover of Darkness 2010s Rock Cutting Crew (I Just) Died in Your Arms 1980s New Wave Hoobastank Crawling in the Dark 2000s Alternative Whitesnake Still of the Night 1980s Metal Foreigner I Want to Know What Love Is 1980s Classic Rock Foreigner Waiting for a Girl Like You 1980s Classic Rock Nightwish Amaranth 2000s Metal The Offspring Days Go By 2010s Rock Smash Mouth Why Can t We Be Friends? 1990s Pop/Rock Smash Mouth Can’t Get Enough of You Baby 1990s Pop/Rock A Flock of Seagulls I Ran (So Far Away) 1980s New Wave Billy Squier Everybody Wants You 1980s Classic Rock Billy Squier The Stroke 1980s Classic Rock Save Ferris Come on Eileen 1990s Reggae/Ska Sheryl Crow All I Wanna Do 1990s Pop/Rock Three Days Grace Animal I Have Become 2000s Rock Kenny Loggins Footloose 1980s Pop/Rock Kenny Loggins I m Alright 1980s Pop/Rock The Allman Brothers Band Jessica 1970s Southern Rock The Band The Weight (Live) 1970s Classic Rock Crossfade Cold 2000s Rock Dragonforce Cry Thunder 2010s Metal Modern English I Melt With You 1980s New Wave Nine Inch Nails Closer 1990s Rock Carly Rae Jepsen Call Me Maybe 2010s Pop/Dance/Electronic Marcy Playground Sex and Candy 1990s Alternative Andrew W.K. Party Hard 2000s Rock Hot Chelle Rae Tonight Tonight 2010s Pop/Dance/Electronic Fun. ft. Janelle MonáeWe Are Young 2010s Indie Rock P!nk Raise Your Glass 2010s Pop-Rock
https://w.atwiki.jp/extensivereading/pages/8.html
Nice... [URL=http //shoals-suzuki.virtualcarbb.info/volvo-seattle.htm#] volvo seattle [/URL] a href=" http //shoals-suzuki.virtualcarbb.info/volvo-seattle.htm " volvo seattle /a http //shoals-suzuki.virtualcarbb.info/volvo-seattle.htm volvo seattle [URL=http //lexus-help.virtualcarbb.info/pennsylvania-car-lemon-law.htm#] pennsylvania car lemon law [/URL] a href=" http //lexus-help.virtualcarbb.info/pennsylvania-car-lemon-law.htm " pennsylvania car lemon law /a http //lexus-help.virtualcarbb.info/pennsylvania-car-lemon-law.htm pennsylvania car lemon law [URL=http //lexus-help.virtualcarbb.info/dodge-pu-heater-core.htm#] dodge pu heater core [/URL] a href=" http //lexus-help.virtualcarbb.info/dodge-pu-heater-core.htm " dodge pu heater core /a http //lexus-help.virtualcarbb.info/dodge-pu-heater-core.htm dodge pu heater core [URL=http //volvo-station.virtualcarbb.info/hyundai-scoupe-window-regulator.htm#] hyundai scoupe window regulator [/URL] a href=" http //volvo-station.virtualcarbb.info/hyundai-scoupe-window-regulator.htm " hyundai scoupe window regulator /a http //volvo-station.virtualcarbb.info/hyundai-scoupe-window-regulator.htm hyundai scoupe window regulator [URL=http //saidie-ford.virtualcarbb.info/honda-truck-burlingame.htm#] honda truck burlingame [/URL] a href=" http //saidie-ford.virtualcarbb.info/honda-truck-burlingame.htm " honda truck burlingame /a http //saidie-ford.virtualcarbb.info/honda-truck-burlingame.htm honda truck burlingame
https://w.atwiki.jp/abwiki/pages/84.html
ちょっとABとは関係のないお話 [edit] HTTPについて † Hyper Text Transfer Protocolの略。Webブラウザとサーバがやりとりする際などに使われる通信プロトコル バージョンHTTP/1.0と1.1が存在する。ここでは一応1.1ベース ↑ [edit] 準備 † まずはソケットを使った通信を読んでsendとrecvを使えるようになって頂きたい ↑ [edit] 使い方 † 初めにsendでHTTPのリクエストを送信する。続いてrecvでサーバから返事を受け取る 以上 ↑ [edit] リクエストの基本構造 † <メソッド><HTTPバージョン>CRLF <ヘッダ>CRLF CRLF メソッドはGETとかHEADとかPUTとか。プログラムでいう所の関数名 ヘッダっていうのはメソッドの付加情報。関数の引数みたいな物です メソッドは常に一つ。ヘッダは任意の個数です。無い場合もあります 各行の終端にはCRLF(Ex"\r\n"のこと)を付け、終端には空行を付けます ↑ [edit] レスポンスの構造 † レスポンスはリクエストをsendでHTTPサーバーに送ると必ず返されrecvで受け取ることが出来ます <HTTPバージョン><ステータスコード>CRLF <ヘッダ>CRLF CRLF <メッセージボディ> HTTPバージョンとステータスコードは送ったHTTPメソッドの実行結果で、これだけはレスポンスの先頭に必ず存在します 例 HTTP/1.1 200 OK ステータスコードは3桁の数字で表され、百の位が2なら成功、4ならクライアント側のエラー、5ならサーバ側のエラーになります 3の場合は処理を完了するために再度適切なリクエスト送信する必要がある場合を示します 1は複雑なんでパス ヘッダはメッセージボディの情報を表す部分ですがもしかしたら無い場合もあるかも メッセージボディはGETだったら対象となったリソース、POSTだったらCGIの実行結果とか ここもヘッダ部分と同様に存在しない場合がある(例:HEADメソッド) ヘッダとの間に空行がはさまっているので注意。またメッセージボディの最後にCRLFは存在しない ↑ [edit] HTTPメソッド † ↑ [edit] GETメソッド † HTTPサーバーからリソースを取得します 基本形 GET uri HTTP/1.1 Host hostname hostnameは接続するホストサーバー名です。ここのWikiだとURLのwww.2chab.netの部分です uriの部分は取得したいURLのホスト名より先の部分を指定します 2ちゃんねるのトップページを取得する例 GET / HTTP/1.1 Host www.2ch.net 本来は/index.htmlとか/の先の指定も必要なんですが、省略するとindex*(*は一字以上の文字列)を指定した事になります 略さないで書くと GET /index.html HTTP/1.1 Host www.2ch.net 成功すればレスポンスのメッセージボディ部分にGETの対象になったリソースが入っている ステータスコードは成功すれば200 OK。リソースが見つからなければ404。アクセス拒否なら403。サーバー過負荷なら503 もちろんこれ以外のステータスコードである可能性もある ↑ [edit] Rangeヘッダ † リソースに対するGETの範囲を指定するリクエストヘッダです リソースの128バイトから256バイトまで取得 Range 128-256 リソースの512バイト以降を取得 Range 512- このヘッダを含めてGETを送った場合、成功時のステータスコードは206になります 失敗した時は416(要求範囲が不正)が返されるかも ↑ [edit] If-Modified-Sinceヘッダ † リソースが指定日時より後に更新されているか調べるヘッダです 更新されていない場合はGETしません GMTで2007年5月5日午前0時以降に更新されているか調べる If-Modified-Since Sun, 5 May 2007 00 00 00 GMT このヘッダを含めてGETを送った場合、リソースが更新されていなければレスポンスには304(未更新)が返されます この場合メッセージボディはありません 更新されていれば普通に200番代のステータスコードとメッセージボディを返してきます ↑ [edit] HEADメソッド † HTTPサーバーからリソースの情報を取得します 基本形 HEAD uri HTTP/1.1 Host hostname CRLF hostname、uriはGETと同じです 成功すればリソースのヘッダだけ返ってきます(つまりHEAD=GET-メッセージボディ) ↑ [edit] POSTメソッド † HTTPサーバーに情報を送信します CGIのパラメータなんかを送信するために使う。実行結果がCGI依存なのでかなり厄介 基本形 POST uri HTTP/1.1 Host hostname Content-Type type Content-Length 25222length CRLF メッセージボディ hostname、uriはGETと同じ typeはフォームデータだけ場合はapplication/x-www-form-urlencoded 何らかのリソースを含む場合はmultipart/form-data 殆ど前者だけで事足りると思うが、アップローダーのようなリソースを受け付けるCGIは後者を利用する lengthは後に続くメッセージボディの長さ メッセージボディはapplication/x-www-form-urlencodedの場合 変数名1=値1 変数名2=値2... のように変数名と値を=で結んだ物を を区切りとして羅列する。変数名も値もURLエンコードされていなければならない multipart/form-dataは大変なので省略 成功すれば二百番台のステータスコードを返す リソースが既に生成されている場合201を返す(見たこと無いけど) ↑ [edit] GETでPOSTする † サーバーに情報を送信する時はPOSTを使うべきだが、極少量のデータであればGETでも送れる 基本形 GET uri?メッセージボディ HTTP/1.1 Host hostname CRLF uriの後に?とPOSTのとき送ったメッセージボディをつける。やはりURLエンコード必須 Content-TypeとContent-Lengthはいらない
https://w.atwiki.jp/memo77/pages/26.html
PageLastUpdate 2012-07-05/today - /yesterday - 印刷時のみ適用するcss ありがちな間違い tDiaryテーマとはてなテーマDOCUTYPE宣言ではまった はてなのメニュー部分ではまった wikiで使うための数値実体参照 Internet Explorer Developer Toolbar あなたのページを最速にする14の掟 よく使うサイト comment とにかく基本はAnother HTML-lint gatewayで自分のサイトをチェックして、ダメなところを徹底的に潰すこと。これをやってるうちに、少しづつ知識がついてくる。 印刷時のみ適用するcss とりあえず@ウィキのこのデザインで印刷時に余計な要素を表示させないサンプル 2012/07/05 @media print { form {display none; } .noprint {display none; } .ddsmoothmenu {display none; } .header {display none; } .footer {display none; } .ads {display none; } #body-footer {display none; } .outer { border-left none; border-right none; } body { font 8pt serif; }} ありがちな間違い スクリプトでcgi呼び出すときに、パラメータ中に?a=1 b=2みたいな記述があるときに を にし忘れる。 tDiaryテーマとはてなテーマ 2007/05/01 なんかtDiaryのテーマとか選んでいるうちに、いじらざるを得なくなってきた。せっかくなので勉強しよう。 tDiaryテーマの作り方 http //www.tdiary.org/doc/HOWTO-make-theme.html テーマ向けHTMLの構造図解 http //tnat.net/img/tdiary_css.png テーマ別によるスタイルシートサンプル http //joram.agz.jp/hatena/theme_body.html#link DOCUTYPE宣言ではまった 2007/05/04 検索語:はてなダイアリー/スキン/テーマ/デザイン/tdiary/崩れる adiareyとimg0chに同じテーマを指定しても同じにならない。adiaryははてなとほぼ同じになるけどimg0chが崩れます。 要素を一個一個つぶしていっても直らない。まったく同じ構造までたどり着いて、img0chのDOCUTYPE宣言にloose.dtdがついてるのに気が付く。 adiary/はてな !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" img0ch !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http //www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd" tDiary !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http //www.w3.org/TR/html4/strict.dtd" で、これが原因でしたorz そっかー、dtdのあるなしで標準モードと互換モードというのがあるのね。勉強になった・・・ http //desperadoes.biz/style/mode.php 追記:と思ったら、tDiaryはTransitionalじゃなくてstrict.dtdがついてる。これはデザインの共有で問題にならないのかしらん? さらに追記:img0chのテンプレートや吐き出されてるのは !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" だった。なんで勘違いしたかというと、IEからHTMLとして保存すると、自動的に !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http //www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd" になるようだ。 はてなのメニュー部分ではまった はてなの一番上のメニュー部分はテーマによって違うらしい。テーブルレイアウトでくるときとそうじゃないときがあるよ。 たぶん古い table border="0" width="100%" cellspacing="0" cellpadding="0" id="banner" ... たぶん新しい div id="simple-header" ... wikiで使うための数値実体参照 2007/05/05 HTMLで使える文字実体参照 http //www.ne.jp/asahi/minazuki/bakera/html/reference/charref 文字 数値実体参照 用途 | | テーブル中で|を書く必要があるとき Internet Explorer Developer Toolbar 2007/05/11 Webページの構造を検証できるMicrosoft純正IE用プラグイン。 http //www.forest.impress.co.jp/article/2007/05/11/iedevtoolbar.html あなたのページを最速にする14の掟 http //blog.livedoor.jp/dankogai/archives/50828720.html HTTPリクエストは最小限に - Make fewer HTTP requests CDNを活用 - Use a CDN Expiresヘッダを利用 - Add an Expires header コンテンツはGzipせよ - Gzip components CSSは上に - Put CSS at the top JSは下に - Move JS to the bottom CSSのexpressionの利用は控えよ - Avoid CSS expressions JSとCSSは外部化せよ - Make JS and CSS external DNS参照を抑えよ - Reduce DNS lookups JSを「縮刷」せよ - Minify JS リダイレクトは控えよ - Avoid redirects スクリプトの重複を削除せよ - Remove duplicate scripts ETagはオフにせよ - Turn off ETags AJAXを小さくしてキャッシュ可能にせよ - Make AJAX cacheable and small よく使うサイト HTML鳩丸倶楽部 http //www.ne.jp/asahi/minazuki/bakera/html/hatomaru comment このページの記述で聞きたいこととか間違ってることとかありましたらコメントを。 名前 コメント すべてのコメントを見る
https://w.atwiki.jp/rxt_team/pages/4.html
!DOCTYPE HTML HTML HEAD TITLE 30秒 /TITLE /HEAD BODY div style="margin 0 auto;width 500px;" P Press W, A, S, D keys to move /P SECTION style="border-style solid; border-width 2px; width 500px;" CANVAS WIDTH="500" HEIGHT="500" ID="canvas_1" tabindex="0" Canvas tag not supported /CANVAS /SECTION div id = "ptx" x /div div id = "pty" y /div div id = "result" result /div /div SCRIPT var canvas = document.getElementById("canvas_1"); canvas.addEventListener( keydown , doKeyDown, true); canvas.addEventListener( keyup , doKeyUp, true); canvas_context = canvas.getContext("2d"); var seconds = 0; //记数时间 var handle; //事件柄 handle = setInterval("timer()",1000); canvas.focus(); var keybuf = {}; var x = 250.0; var y = 250.0; var bulletList = new Array(60); for (var i=0; i bulletList.length ; i++) { var tempBullet; if((tempBullet=createBullet())!=null ){ bulletList[i] = null; bulletList[i] =tempBullet; } } setInterval("reflash()", 1000 / 60); function reflash() { clearCanvas(); canvas_context.fillStyle = "orange"; //canvas_context.fillRect(x, y, 10, 10); canvas_context.beginPath(); canvas_context.arc(x,y,5,0,2*Math.PI,true); canvas_context.stroke(); canvas_context.fill(); // draw bullet doKeyEvent(); for (var i=0; i bulletList.length ; i++) { bulletList[i].move(); bulletList[i].draw(); } // hit bullet for (var k=0; k bulletList.length ; k++) { //if(Math.abs(x-bulletList[k].bx) 10.0 Math.abs(y-bulletList[k].by) 10.0){ if( Math.sqrt(Math.pow((x-bulletList[k].bx),2)+ Math.pow((y-bulletList[k].by),2)) 10 ) { if(seconds = 10){ alert("you lost" + "\n"+seconds+"\n"+"你弱爆了!!"); }else if (seconds 20 ){ alert("you lost" + "\n"+seconds+"\n"+"再接再厉!!"); }else if (seconds 30 ){ alert("you lost" + "\n"+seconds+"\n"+"你是男人!"); }else if (seconds 40 ){ alert("you lost" + "\n"+seconds+"\n"+"你是男人!"); }else if (seconds 50 ){ alert("you lost" + "\n"+seconds+"\n"+"你是男人!!"); }else if (seconds 60 ){ alert("you lost" + "\n"+seconds+"\n"+"你是男人!!!"); }else if (seconds = 70 ){ alert("you lost" + "\n"+seconds+"\n"+"春哥附体拉!"); } window.location.reload(); //document.getElementById("result").innerHTML = "you failed"; } } // bullet number for (var j=0; j bulletList.length ; j++) { if (bulletList[j].bx 0 || bulletList[j].bx 500 || bulletList[j].by 0 || bulletList[j].by 500) { var tempBullet; if((tempBullet=createBullet()) != null ) { bulletList[j] = null; bulletList[j] = tempBullet; } else{ i--; } } } document.getElementById("ptx").innerHTML = x; document.getElementById("pty").innerHTML = y; } function timer () { seconds ++; } function createBullet(){ var dir = Math.ceil(Math.random()*4); var s_x ; var s_y ; var s_cos ; var s_sin ; if(dir == 1){ s_x = Math.ceil(Math.random()*490); s_y = 0; s_cos = Math.random() * 2.0-1.0; s_sin = Math.sqrt(1-s_cos * s_cos); } else if (dir == 2){ s_x = 0; s_y = Math.ceil(Math.random()*490); s_sin = Math.random() * 2.0-1.0 ; s_cos = Math.sqrt(1-s_sin * s_sin); } else if (dir == 3){ s_x = Math.ceil(Math.random()*490) ; s_y = 490; s_cos = Math.random() * 2.0-1.0; s_sin = -Math.sqrt(1-s_cos * s_cos); } else if (dir == 4){ s_x = 490; s_y = Math.ceil(Math.random()*490); s_sin = Math.random() * 2.0-1.0 ; s_cos = -Math.sqrt(1-s_sin * s_sin); } else if (dir ==0 ){ return null; } return new bullet(s_x,s_y,s_cos,s_sin); } function doKeyUp(e) { var evt = e || window.event; keybuf[evt.keyCode] = false; //doKeyEvent(); } function doKeyPress(e) { doKeyEvent(); } function doKeyDown(e) { var evt = e || window.event; keybuf[evt.keyCode] = true; //doKeyEvent(); } function doKeyEvent() { var speed = 1.5 ; //THE w KEY if (keybuf[87] == true judge_frontier()) { y = y - speed; if (!judge_frontier()) { y = y + speed; } } //THE s KEY if (keybuf[83] == true judge_frontier()) { y = y + speed; if (!judge_frontier()) { y = y - speed; } } //THE a KEY if (keybuf[65] == true judge_frontier()) { x = x - speed; if (!judge_frontier()) { x = x + speed; } } //THE d KEY if (keybuf[68] == true judge_frontier()) { x = x + speed; if (!judge_frontier()) { x = x - speed; } } } function judge_frontier() { if (x 5 || x 475 || y 5 || y 475) { return false; } else { return true; } } function bullet(startx , starty, cos , sin) { this.bx = startx; this.by = starty; this.speed = 1.0; //this.startx = startx; //this.starty = starty; this.cos = cos; this.sin = sin; this.draw = function() { canvas_context.fillStyle = "brown"; //canvas_context.fillRect(this.bx, this.by, 10, 10); canvas_context.beginPath(); canvas_context.arc(this.bx, this.by,5,0,2*Math.PI,true); canvas_context.stroke(); canvas_context.fill(); } this.move = function() { this.bx = this.bx + this.speed * this.cos; this.by = this.by + this.speed * this.sin; } } function clearCanvas() { canvas.width = canvas.width; } /SCRIPT /BODY /HTML
https://w.atwiki.jp/orange3/pages/6.html
htmlフォルダ admin? adventurer_guildsman? auction? chamberlain? classmaster? CommunityBoard? custom? default? doormen? fisherman? guard? help? merchant? mercmanager? observation? olympiad? seven_signs? siege? teleporter? symbolmaker? trainer? villagemaster? tutorial? warehouse? × npcbusy.htm × npcdefault.htm × territorystaus.htm
https://w.atwiki.jp/eriax/pages/121.html
制限 セクション構造からのアウトライン抽出は HTML 4.4.11.1 に準拠。効率は考慮外。 Microdata アイテム抽出は HTML 5.2.5, 5.5.1 に準拠。ただし絶対 URI のチェックはしない。 どちらも抽出するだけ。 使用例 アウトライン var hapi = HTML_Outlines_and_Microdata_for_HTML_Browsers; // 文字列として確認 alert(hapi.createOutlineString(document)); // ul 要素を生成 var toc = hapi.createOutlineList(document); Microdata var hapi = HTML_Outlines_and_Microdata_for_HTML_Browsers; // 文書内のアイテムを JSON で抽出 var items = hapi.findAllItems(document); var jsonData = JSON.stringify(items); ソースコード if ( undefined === typeof Array.prototype.map) { Array.prototype.map = function (callbackfn) { var thisArg = arguments[1]; var result; var count; var i; if ( function !== typeof callbackfn) { throw new Error; } count = this.length; result = new Array(count); for (i = 0; i count; i++) { if (i in this) { result[i] = callbackfn.call(thisArg, this[i], i, this); } } return result; }; } if ( undefined === typeof Array.prototype.indexOf) { Array.prototype.indexOf = function (ceil, floor) { return function (searchElement) { var fromIndex = arguments[1]; var count = this.length; var i = Number(fromIndex) || 0; i = (i 0) ? ceil(i) floor(i); if (i 0) { i += count; } for (; i count; i++) { if (i in this) { if (this[i] === searchElement) { return i; } } } return -1; }; }(Math.ceil, Math.floor); } if ( undefined === typeof Array.prototype.filter) { Array.prototype.filter = function (callbackfn) { var thisArg = arguments[1]; var result; var count; var i; var v; if ( function !== typeof callbackfn) { throw new Error; } count = this.length; result = new Array; for (i = 0; i count; i++) { if (i in this) { if (callbackfn.call(thisArg, v = this[i], i, this)) { result[result.length] = v; } } } return result; }; } //////////////////////////////////////////////////////////////////////// var HTML_Outlines_and_Microdata_for_HTML_Browsers = new function () { /*@cc_on@*/ ////////////////////// // Outlines // var isSectioningContent = function () { var Names = /^(? section|nav|article|aside)$/i; return function (node) { return node (node.nodeType === 1) Names.test(node.tagName); }; }(); var isSectioningRoot = function () { var Names = /^(? body|blockquote|details|fieldset|figure|td)$/i; return function (node) { return node (node.nodeType === 1) Names.test(node.tagName); }; }(); var isHeadingContent = function () { var Names = /^(? h[1-6]|hgroup)$/i; return function (node) { return node (node.nodeType === 1) Names.test(node.tagName); }; }(); var isHeadingGroupContent = function () { var Names = /^hgroup$/i; return function (node) { return node (node.nodeType === 1) Names.test(node.tagName); }; }(); var getLevel = function (elt) { if (isHeadingGroupContent(elt)) { return getHeadingGroupLevel(elt); } return getSingleHeadingLevel(elt); }; var getSingleHeadingLevel = function (elt) { return parseInt(elt.tagName.slice(-1)); }; var getHeadingGroupLevel = function (elt) { var maxLevel = Infinity; var currentLevel; var nodes = elt.childNodes; var node; var i; for (i = 0; node = nodes[i++];) { if (isHeadingContent(node)) { currentLevel = getSingleHeadingLevel(node); if (currentLevel maxLevel) { maxLevel = currentLevel; } } } return maxLevel; }; // function HTMLOutlinee(arg) { if (arguments.length 0) { if (arg) { var p; for (p in arg) { if (arg.hasOwnProperty(p)) { this[p] = arg[p]; } } } } } HTMLOutlinee.create = function (element) { return new HTMLOutlinee({ element element, sections [], parent null }); }; HTMLOutlinee.prototype = new function () { this.element = null; this.sections = null; this.parent = null; this.type = #outlinee ; this.addSection = function (section) { this.sections.push(section); section.outlinee = this; return section; }; this.getFirstSection = function () { return this.sections[0]; }; this.getLastSection = function () { var sections = this.sections; return sections[sections.length - 1]; }; this.toString = function () { return [object HTMLOutlinee] ; }; }; function HTMLSection(arg) { if (arguments.length 0) { if (arg) { var p; for (p in arg) { if (arg.hasOwnProperty(p)) { this[p] = arg[p]; } } } } } HTMLSection.create = function (heading, parent, outlinee) { return new HTMLSection({ heading heading, parent parent, children [], outlinee outlinee, associated [] }); }; (function () { this.heading = null; this.parent = null; this.children = null; this.outlinee = null; this.associated = null; this.type = #section ; this.appendChild = function (div) { this.children.push(div); div.parent = this; return div; }; this.hasChildSections = function () { var nodes = this.children; var nodeCount = nodes.length; var i; for (i = 0; i nodeCount; i++) { if (nodes[i] instanceof HTMLSection) { return true; } } return false; }; this.getLastSection = function () { var nodes = this.children; var nodeCount = nodes.length; var node; var i; for (i = nodeCount; i 0;) { node = nodes[i -= 1]; if (node instanceof HTMLSection) { return node; } } return null; }; this.associate = function (node) { this.associated.push(node); return node; }; this.toString = function () { return [object HTMLSection] ; }; }).call(HTMLSection.prototype); function createOutlinee(root) { var currentOutlinee = null; var currentSection = null; var stack = []; (function (root, callbackfn) { var node = root; var n; while (node) { callbackfn(node, enter ); if ((n = node.firstChild)) { node = n; continue; } do { callbackfn(node, exit ); if (node == root) { node = null; break; } if ((n = node.nextSibling)) { node = n; break; } } while ((node = node.parentNode)) } })(root, function (node, mode) { var top = stack[stack.length - 1]; if (top === node mode === exit ) { stack.pop(); } else if (isHeadingContent(top)) { ; } else if (mode === enter (isSectioningContent(node) || isSectioningRoot(node))) { if (currentOutlinee !== null currentSection.heading === null) { currentSection.heading = undefined; } if (currentOutlinee !== null) { stack.push(currentOutlinee); } currentOutlinee = HTMLOutlinee.create(node); currentSection = HTMLSection.create(null, currentSection, currentOutlinee); currentOutlinee.addSection(currentSection); } else if (mode === exit (isSectioningContent(node) stack.length 0)) { var outlinee = currentOutlinee; currentOutlinee = stack.pop(); currentSection = currentOutlinee.getLastSection(); currentSection.appendChild(outlinee); } else if (mode === exit (isSectioningRoot(node) stack.length 0)) { var outlinee = currentOutlinee; currentOutlinee = stack.pop(); currentSection = currentOutlinee.getLastSection(); while (currentSection.hasChildSections()) { currentSection = currentSection.getLastSection(); } currentSection.appendChild(outlinee); } else if (mode === exit (isSectioningContent(node) || isSectioningRoot(node))) { currentSection = currentOutlinee.getFirstSection(); } else if (currentOutlinee === null) {} else if (mode === enter isHeadingContent(node)) { if (currentSection.heading == null) { currentSection.heading = node; } else if (getLevel(node) = getLevel(currentOutlinee.getLastSection().heading)) { currentSection = currentOutlinee.addSection(HTMLSection.create(node, currentSection.parent, currentOutlinee)); } else { var candidateSection = currentSection; while (true) { if (getLevel(node) getLevel(candidateSection.heading)) { currentSection = candidateSection.appendChild(HTMLSection.create(node, candidateSection.parent, currentOutlinee)); break; } var newCandidateSection = candidateSection.parent; candidateSection = newCandidateSection; } } stack.push(node); } else {} if (mode === exit currentSection !== null) { currentSection.associate(node); } }); if (currentOutlinee === null) { return null; } return currentOutlinee; } var getTextContent = function (n) { switch (n.nodeType) { case 1 if (/^img$/i.test(n.nodeName)) { return n.alt; } if (/^input$/i.test(n.nodeName)) { return n.value; } return Array.prototype.concat.apply([], Array.prototype.map.call(n.childNodes, arguments.callee)).join( ); case 3 case 4 return n.data; default return ; } }; (function () { this.isSectioningRoot = function () { return isSectioningRoot(this.element); }; this.hasEffectiveSections = function () { var sections = this.sections; var section; switch (sections.length) { case 0 return false; case 1 return sections[0].isEffectiveSection(); default return true; } }; this.toJSON = function (internal) { var children = []; var sections = this.sections; var sectionCount = sections.length; var i; for (i = 0; i sectionCount; i++) { children = children.concat(sections[i].toJSON(true)); } if (internal !this.isSectioningRoot()) { return children; } return { type #root , context this.element.tagName, children children }; }; }).call(HTMLOutlinee.prototype); (function () { this.isEffectiveSection = function () { return isSectioningContent(this.outlinee.element) || this.hasChildSections() || this.heading !== null; }; this.toJSON = function () { var heading = this.heading; var tagName = this.outlinee.element.tagName; var id; var label; if (heading) { id = heading.id; label = getTextContent(heading); } else { if (heading === null) { label = (anonymous\x20 + tagName + ) ; } else { label = (undefined\x20 + tagName + ) ; } } var children = this.children; var childCount = children.length; var result = []; var i; for (i = 0; i childCount; i++) { result = result.concat(children[i].toJSON(true)); } return { context tagName, type #section , id id, label label, children result }; }; }).call(HTMLSection.prototype); // var outlineToList = function (jsonData, params) { var doc = params.ownerDocument; var list0 = doc.createElement(params.tagName || ul ); var item0 = doc.createElement( li ); var frag0 = doc.createDocumentFragment(); item0.appendChild(doc.createElement( a )).appendChild(doc.createTextNode( _ )); return (function (data) { var list; var item; var frag = frag0.cloneNode(false); var children = data.children; var childCount = children.length; var child; var i; var n; var s; if (childCount 0) { for (i = 0; i childCount; i++) { child = children[i]; item = item0.cloneNode(true); n = item.firstChild; if (child.type === #section ) { if ((s = child.id)) { n.href = # + encodeURIComponent(s); } n.firstChild.data = child.label; frag.appendChild(item); frag.appendChild(arguments.callee(child)); } } list = list0.cloneNode(false); list.appendChild(frag); } else { list = frag; } return list; })(jsonData); }; this.createOutlineList = function (root, doc) { var outlinee = createOutlinee(root); if (!doc) { doc = (root.nodeType === 9) ? root root.ownerDocument; } return outlineToList(outlinee.toJSON(), { ownerDocument doc, tagName ul }); }; var outlineToString = function (jsonData, level) { var tab = 2; if (!level) { level = 1; } var padding; var result = []; if (jsonData.type === #root ) { padding = new Array(level).join( \x20\x20 ) + = ; result.push(padding + [ + jsonData.context + ] ); level += tab; } var children = jsonData.children; var childCount = children.length; var child; var i; var c; if (childCount 0) { padding = new Array(level).join( \x20\x20 ) + + ; for (i = 0; i childCount; i++) { child = children[i]; if (child.type === #section ) { result.push(padding + [ + child.context + ] + child.label.replace(/^\s+|\s+$/g, ).replace(/(? \r\n|\r|\n)+/g, -- ).replace(/\s{2,}/g, \x20 )); } if ((c = arguments.callee(child, level + tab))) { result.push(c); } } } return result.join( \n ); }; this.createOutlineString = function (root) { var outlinee = createOutlinee(root); return outlineToString (outlinee.toJSON()); }; ////////////////////// // Microdata // var findItemProperties = function (root) { var push = Array.prototype.push; var filter = Array.prototype.filter; var isElement = function (n) { return n.nodeType === 1; }; var results = []; var memory = []; var pending = []; results.push(root); push.apply(pending, filter.call(root.childNodes, isElement)); /*@if(1)var a;if((a=root.getAttributeNode( itemref )) a.specified){@else@*/ if (root.hasAttribute( itemref )) { /*@end@*/ var refs; var TrailWS = /^\s+|\s+$/g; var WS = /\s+/; if ((refs = root.getAttribute( itemref /*@,0@*/)) (refs = refs.replace(TrailWS, ))) { refs = refs.split(WS); var refCount = refs.length; var doc = root.ownerDocument; var m; var i; for (i = 0; i refCount; i++) { if ((m = doc.getElementById(refs[i]))) { pending.push(m); } } } } while (pending.length 0) { var current = pending.shift(); if (memory.indexOf(current) = 0) { continue; } memory.push(current); /*@if(1)var a;if(!(a=current.getAttributeNode( itemscope ))||!a.specified){@else@*/ if (!current.hasAttribute( itemscope )) { /*@end@*/ push.apply(pending, filter.call(current.childNodes, isElement)); } /*@if(1)var a;if((a=current.getAttributeNode( itemprop )) a.specified){@else@*/ if (current.hasAttribute( itemprop )) { /*@end@*/ results.push(current); } } if ( undefined !== typeof root.compareDocumentPosition) { results.sort(function (e1, e2) { if (e1.isSameNode(e2)) { return 0; } if (0 !== (e1.compareDocumentPosition(e2) Node.DOCUMENT_POSITION_FOLLOWING)) { return -1; } return 1; }); } else { /*@if(1)results.sort(function(e1,e2){return e1.sourceIndex-e2.sourceIndex});@else@*/ var r1 = root.ownerDocument.createRange(); var r2 = root.ownerDocument.createRange(); results.sort(function (e1, e2) { r1.selectNode(e1); r2.selectNode(e2); return r1.compareBoundaryPoints(Range.START_TO_START, r2); }); /*@end@*/ } return results; }; var findAllItems_JSON = function (root) { var result = {}; var items = []; var elems = root.getElementsByTagName( * ); var elemCount = elems.length; var elem; var i; for (i = 0; i elemCount; i++) { elem = elems[i]; /*@if(1)var a;if(elem.nodeType===1 (a=elem.getAttributeNode( itemscope )) a.specified){@else@*/ if (elem.hasAttribute( itemscope )) { /*@end@*/ items.push(getObject_JSON(elem, [])); } } result[ items ] = items; return result; }; var getObject_JSON = function (item, memory) { var result = {}; memory.push(item); /*@if(1)var a;if((a=item.getAttributeNode( itemtype )) a.specified){@else@*/ if (item.hasAttribute( itemtype )) { /*@end@*/ result[ type ] = item.getAttribute( itemtype /*@,0@*/ ); } /*@if(1)var a;if((a=item.getAttributeNode( itemid )) a.specified){@else@*/ if (item.hasAttribute( itemid )) { /*@end@*/ result[ id ] = item.getAttribute( itemid /*@,0@*/ ); } var properties = {}; var elems = findItemProperties(item); var elemCount = elems.length; var elem; var i; var TrailWS = /^\s+|\s+$/g; var WS = /\s+/; for (i = 0; i elemCount; i++) { elem = elems[i]; /*@if(1)var a;if(!(a=elem.getAttributeNode( itemprop ))||!a.specified){@else@*/ if (!elem.hasAttribute( itemprop )) { /*@end@*/ continue; } var names = elem.getAttribute( itemprop /*@,0@*/ ).replace(TrailWS, ); if (!names) { continue; } names = names.split(WS); var value; /*@if(1)var a;if((a=elem.getAttributeNode( itemscope )) a.specified){@else@*/ if (elem.hasAttribute( itemscope )) { /*@end@*/ if (memory.indexOf(elem) 0) { value = getObject_JSON(elem, memory); } else { value = ERROR ; } } else { switch (elem.tagName.toUpperCase()) { case META value = elem.content || ; break; case EMBED case IFRAME case IMG value = elem.src || ; break; case AUDIO case SOURCE case TRACK case VIDEO value = elem.src; if ( undefined === typeof value) { value = elem.getAttribute( src /*@,0@*/ ) || ; } break; case A case AREA case LINK value = elem.href; break; case OBJECT value = elem.data; break; case TIME value = elem.dateTime; if ( undefined === typeof value) { value = elem.getAttribute( datetime /*@,0@*/ ) || ; } break; default /*@if(1)var s;if( undefined !==typeof(s=elem.innerText)){value=s}@else@*/ value = elem.textContent; /*@end@*/ break; } } var nameCount = names.length; var name; var j; for (j = 0; j nameCount; j++) { name = names[j]; if (properties.hasOwnProperty(name)) { properties[name].push(value); } else { properties[name] = [value]; } } } result[ properties ] = properties; return result; }; this.findAllItems = findAllItems_JSON; }; 初出 2011-09-04/05 修正 2012-03-05
https://w.atwiki.jp/javadsge/pages/359.html
package rc; import tool.*; public class pro { String u; String[] data=new String[5000]; int s,datanumber; public static void main(String[] args) { pro tes=new pro(); } pro(){ int p; for(p=1;p 15;p++){ u="http //www.coara.or.jp/~cheerkey/shiho/shiho"+p+".html"; getdata sub=new getdata(); sub.makedata(u,"SJIS"); data=sub.data; datanumber=sub.datanumber; int tr; for(tr=1;tr 10;tr++){ for(s=1;s datanumber+1;s++){ int p1=data[s].indexOf(" "); int p2=data[s].indexOf(" "); String str; str=""; if(p1 -1)str=data[s].substring(p1,p2+1); data[s]=data[s].replace(str,""); }} writefile sub3=new writefile(); sub3.data=data; sub3.datanumber=datanumber; sub3.makedata(p+".txt"); } } }